package com.debao.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.debao.system.mapper.StatisticMapper;
import com.debao.system.domain.Statistic;
import com.debao.system.service.IStatisticService;

/**
 * 统计Service业务层处理
 * 
 * @author DeBao
 * @date 2024-11-18
 */
@Service
public class StatisticServiceImpl implements IStatisticService 
{
    @Autowired
    private StatisticMapper statisticMapper;


    /**
     * 查询统计列表
     * 
     * @param statistic 统计
     * @return 统计
     */
    @Override
    public List<Statistic> selectStatisticList(Statistic statistic)
    {
        return statisticMapper.selectStatisticList(statistic);
    }

    /**
     * 新增统计
     * 
     * @param statistic 统计
     * @return 结果
     */
    @Override
    public int insertStatistic(Statistic statistic)
    {
        return statisticMapper.insertStatistic(statistic);
    }



    @Override
    public int totalMoney(String beforeDate){
        return statisticMapper.moneyStatistics(beforeDate);
    }

    @Override
    public Statistic selectStatisticsByDate(String beforeDate) {
        return statisticMapper.selectStatisticsByDate(beforeDate);
    }
}
